#include "FreeRTOS.h"
#include "task.h"

#include "sys.h"

void vApplicationGetIdleTaskMemory(
    StaticTask_t **ppxIdleTaskTCBBuffer,
    StackType_t **ppxIdleTaskStackBuffer,
    uint32_t *pulIdleTaskStackSize )
{
    static StaticTask_t _task_buffer;
    static StackType_t  _stack_buffer[configMINIMAL_STACK_SIZE];

    *ppxIdleTaskTCBBuffer   = &_task_buffer;
    *ppxIdleTaskStackBuffer = &_stack_buffer;
    *pulIdleTaskStackSize   = configMINIMAL_STACK_SIZE;
}

void vApplicationGetTimerTaskMemory(
    StaticTask_t **ppxTimerTaskTCBBuffer,
    StackType_t **ppxTimerTaskStackBuffer,
    uint32_t *pulTimerTaskStackSize )
{
    static StaticTask_t _task_buffer;
    static StackType_t  _stack_buffer[configTIMER_TASK_STACK_DEPTH];

    *ppxTimerTaskTCBBuffer   = &_task_buffer;
    *ppxTimerTaskStackBuffer = &_stack_buffer;
    *pulTimerTaskStackSize   = configTIMER_TASK_STACK_DEPTH;
}

void vApplicationStackOverflowHook( TaskHandle_t xTask, char *pcTaskName )
{
    configASSERT(0);
}
